$OpenBSD: patch-utils_kamctl_kamdbctl_base,v 1.3 2015/11/20 10:09:52 sthen Exp $
--- utils/kamctl/kamdbctl.base.orig	Fri Oct  2 15:35:18 2015
+++ utils/kamctl/kamdbctl.base	Mon Oct 19 14:00:40 2015
@@ -154,7 +154,7 @@ credentials()
 mdbg() {
 	if [ "0$VERBOSE" -ne 0 ] ; then
 		if [ -t 1 -a -z "$NOHLPRINT" ] ; then
-			echo -e "\033[1m$1\033[0m"
+			printf "\033[1m$1\033[0m\n"
 		else
 			echo "$1"
 		fi
@@ -163,7 +163,7 @@ mdbg() {
 
 mwarn() {
 	if [ -t 1 -a -z "$NOHLPRINT" ] ; then
-		echo -e '\E[37;32m'"\033[1mWARNING: $1\033[0m"
+		printf '\e[37;32m'"\033[1mWARNING: $1\033[0m\n"
 	else
 		echo "** WARNING: $1"
 	fi
@@ -171,7 +171,7 @@ mwarn() {
 
 minfo() {
 	if [ -t 1 -a -z "$NOHLPRINT" ] ; then
-		echo -e '\E[37;33m'"\033[1mINFO: $1\033[0m"
+		printf '\e[37;33m'"\033[1mINFO: $1\033[0m\n"
 	else
 		echo "** INFO: $1"
 	fi
@@ -179,7 +179,7 @@ minfo() {
 
 mecho() {
 	if [ -t 1 -a -z "$NOHLPRINT" ] ; then
-		echo -e "\033[1m$1\033[0m"
+		printf "\033[1m$1\033[0m\n"
 	else
 		echo "$1"
 	fi
@@ -187,7 +187,7 @@ mecho() {
 
 merr() {
 	if [ -t 1 -a -z "$NOHLPRINT" ] ; then
-		echo -e '\E[37;31m'"\033[1mERROR: $1\033[0m"
+		printf '\e[37;31m'"\033[1mERROR: $1\033[0m\n"
 	else
 		echo "** ERROR: $1"
 	fi
@@ -213,8 +213,8 @@ get_answer ()
     else
         ANSWER=${value}
     fi
-    ANSWER=${ANSWER:0:1}
-    ANSWER=${ANSWER/Y/y}
-    ANSWER=${ANSWER/N/n}
+    ANSWER=`echo ${ANSWER} | cut -c1`
+    ANSWER=`echo ${ANSWER} | sed 's/Y/y/'`
+    ANSWER=`echo ${ANSWER} | sed 's/N/n/'`
 }
 
